package io.bdmc.modules.bss.mapper;

import io.bdmc.modules.bss.entity.DeviceAlarm;
import io.bdmc.modules.bss.entity.DeviceAlarmRealtime;
import io.bdmc.modules.bss.entity.DeviceFibreMatch;
import io.bdmc.modules.bss.model.DeviceAlarmParam;
import org.apache.ibatis.annotations.Param;
import io.bdmc.common.utils.MyPage;

import java.util.HashMap;
import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 * 设备报警 Mapper 接口
 * </p>
 *
 * @author ping
 * @since 2020-07-01
 */
public interface DeviceAlarmMapper extends BaseMapper<DeviceAlarm> {

    MyPage<DeviceAlarm> mySelectPage(@Param("myPage") MyPage<DeviceAlarm> myPage,
            @Param("param") DeviceAlarmParam param);

    List<DeviceAlarm> selectAllLastAlarm();

    List<DeviceFibreMatch> deviceLastLengthAlarm();

    List<HashMap<String, Object>> alarmTypeSum(@Param("deptId") Long deptId);

    List<HashMap<String, Object>> alarmCodeSum(@Param("deptId") Long deptId);

    int alarmFibreCount(Long deptId);

    List<DeviceAlarmRealtime> selectHistoryAlarmList(@Param("param") DeviceAlarmParam param);
}
